#ifndef _ENCODER_H_
#define	_ENCODER_H_

#include "esp_peripherals.h"
#include "driver/gpio.h"

typedef struct {
    gpio_num_t encoder_A_pin;  
    gpio_num_t encoder_B_pin;
    gpio_num_t encoder_K_pin;
} periph_encoder_cfg_t;


typedef void (*encoder_call)(int ev);

void Encoder_Init(void);
char Encoder_Get_State(void);
void Encoder_scan(void *pvParam);
void encoder_set_cb(encoder_call cb);

#endif

